import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    letter:"A",
    city:localStorage.getItem("city") || "襄阳"
  },
  mutations: {
    chengLetter(state,letter){
      state.letter=letter;
    },
     changeCity(state,city){
       localStorage.setItem("city",city)
      state.city=city;
    }
  },
  actions: {
    // chengLetter(ctx,letter){
    //   ctx.commit("chengLetter",letter)
    // },
  }
})
